package com.cyz.common.utils;

import org.springframework.util.AntPathMatcher;

public class PathMatchUtil {
    public static AntPathMatcher antPathMatcher = new AntPathMatcher();

    public static boolean isMatcher(String pattern,String path){
        return antPathMatcher.match(pattern,path);
    }

    public static boolean isMatcher(String[] patterns, String path){
        for (String pattern : patterns) {
            if(isMatcher(pattern,path)){
                return true;
            }
        }
        return false;
    }
}
